package logic

import (
	"context"
	"fmt"

	"go-zero-mult/service/rpc/merchant/internal/svc"
	"go-zero-mult/service/rpc/merchant/merchant_pb"

	"github.com/tal-tech/go-zero/core/logx"
)

type MerchantRegisterLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewMerchantRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MerchantRegisterLogic {
	return &MerchantRegisterLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *MerchantRegisterLogic) MerchantRegister(in *merchant_pb.MerchantReq) (*merchant_pb.MerchantResp, error) {
	// todo: add your logic here and delete this line

	fmt.Printf("请求的数据为%s\n", in)


	return &merchant_pb.MerchantResp{
		Id: 100,
		Username: in.Username,
	}, nil
	//return &merchant_pb.MerchantResp{}, nil
}
